home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / fctr.doc < prev    next >
Text File  |  1995-03-31  |  3KB  |  101 lines

  1. (Comp.sources.hp48) 
  2. Item: 104 by kalb@informatik.uni-erlangen.de 
  3. Author: [Klaus Kalb] 
  4.   Subj: fctr - Factoring v1.2 
  5.   Date: Mon May 04 1992 
  6.  
  7. FCTR is a library for the pocket calculator HP48SX to recognize prime 
  8. numbers and factor integers into primes.  
  9. All commands supplied by FCTR are also contained in the library NTL2. 
  10. This library is meant for persons who want the Factor program but 
  11. don't have enough room to keep NTL2.  [Like me! -jkh-] 
  12.  
  13. It is provided as is, without any warranty or assertion of fitness for 
  14. any purpose. Note that this library makes use of undocumented and  
  15. unsupported features of the HP48. This might cause data loss or even 
  16. hardware damage. Use it at your own risk. 
  17.  
  18. This software may be distributed freely for noncommercial purposes, as 
  19. long as this file and the documentation file is distributed with it. 
  20. You may not make any changes to the software or to the documentation, 
  21. put it into ROM, publish it in journals or sell it without written 
  22. permission of the author. 
  23.  
  24. Parts of the code in this library were developed by Jurjen N. E. Bos 
  25. and are included with his kind permission. Thus this library contains 
  26. a slightly improved version of his `Ultimate Factoring Program'.   
  27.  
  28. 15/4/92, -KK 
  29.  
  30.                     Klaus Kalb 
  31.                     Huettendorfer Weg 14 
  32.                     W-8510 Fuerth 17 
  33.                     Federal Republic of Germany 
  34.  
  35.                     email: kskalb@informatik.uni-erlangen.de 
  36.                      
  37. This is the complete documentation of the library FCTR version 1.2. 
  38. The ID of this library is 1671 and the title reads `FCTR 1.2 Factoring` 
  39.  
  40. The command `AboutFCTR` should display the following screen: 
  41.  
  42.          FCTR 1.2 Factoring 
  43.          created 04/15/92 00:38 
  44.          (C) 1992 by Klaus Kalb 
  45.          Credits to Jurjen Bos 
  46.                      
  47.  
  48. and return the version identification string "1.2" to level 1. 
  49.  
  50.  
  51.  
  52. ---------- THE LIBRARY COMMANDS ---------- 
  53.  
  54.  
  55. Prm? 
  56.  
  57.     Tests wether its argument is a prime number 
  58.     Returns 1 if it's a prime, else 0 
  59.     If the number to test is greater then 25*10^9, the 
  60.     test may take up to several minutes. 
  61.     Negative primes are recognized correctly 
  62.  
  63.     mode maps: 
  64.         #m     -> 0/1 
  65.         m      -> 0/1 
  66.  
  67.  
  68. NPrm 
  69.  
  70.     Finds the smallest prime greater then the absolute value 
  71.     of the argument 
  72.  
  73.     mode maps: 
  74.         #x     -> #p 
  75.         x      -> p 
  76.  
  77.  
  78. PPrm 
  79.  
  80.     Finds the greatest prime less then the absolute value 
  81.     of the argument 
  82.  
  83.     mode maps: 
  84.         #x    -> #p 
  85.         x     -> p 
  86.  
  87.  
  88. Factor 
  89.  
  90.     Factors its argument into primes 
  91.     The output will be a list containing all prime divisors 
  92.     (repeated according to their multiplicity) in ascending 
  93.     order. 
  94.     The entries in the list will have the same type as the 
  95.     argument. 
  96.     The number to be factored must be positive. 
  97.  
  98.     mode maps: 
  99.         #x    -> { #p_1 #p_2 ... } 
  100.         x     -> { p_1 p_2 ... } 
  101.